#include <bits/stdc++.h>

using namespace std;
#define int long long
const int inf = 0x3f3f3f3f3f3f3f3f;

void solve()
{
    int n, k;
    cin >> n >> k;
    if (k == n - 1)
    {
        cout << -1;
        return;
    }
    int i = 1;
    vector<int> ans;
    for (; i <= k; i++) ans.push_back(i);
    for (int j = n; j >= i; j--) ans.push_back(j);
    for (int j = 0; j < n; j++)
    {
        if (j >= k && ans[j] == j + 1) swap(ans[j], ans[j + 1]);
    }
    for (int j = 0; j < n; j++) cout << ans[j] << ' ';
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int _ = 1;
    //cin >> _;
    while (_--)
    {
        solve();
    }
    return 0;
}